<?php


/**
 * store view times.
 * structure: 
 * 
 */

class ViewStatistic extends MrMongoDocument {

	public $domain;
	public $date;
	public $views;
	public $hours = array ();
	public $update;

	public function getCollectionName() {
		return 'view_statistics';
	}
	public function rules()
    {
        return array(
            array('update','default','value'=>time() ,'on'=>'insert,update'),
        );
    }
	
	/**
	 *  This method have to be defined in every model, like with normal CActiveRecord 
	 */
	public static function model($className = __CLASS__) {
		return parent :: model($className);
	}
}